package org.ycx.upms.dao.model;

import java.io.Serializable;
import java.util.Date;
import org.ycx.common.annotation.FormDesc;

@FormDesc(pk="aid")
public class SecAttachment implements Serializable {
    /** 主键 */
    @FormDesc(name="主键",maxLength=10,type=1)
    private Integer aid;

    /** 对象名 */
    @FormDesc(name="对象名",maxLength=100,type=0)
    private String objectName;

    /** 对象key */
    @FormDesc(name="对象key",maxLength=100,type=0)
    private String objectKey;

    /** 附件名称 */
    @FormDesc(name="附件名称",maxLength=100,type=0)
    private String name;

    /** 附件MIME */
    @FormDesc(name="附件MIME",maxLength=100,type=0)
    private String mime;

    /** 说明信息 */
    @FormDesc(name="说明信息",maxLength=500,type=0)
    private String fileDesc;

    /** 附件URI */
    @FormDesc(name="附件URI",maxLength=200,type=0)
    private String uri;

    /** 验证值 */
    @FormDesc(name="验证值",maxLength=100,type=0)
    private String code;

    /** 创建时间 */
    @FormDesc(name="创建时间",maxLength=10,type=3)
    private Date createTs;

    /** 创建人 */
    @FormDesc(name="创建人",maxLength=10,type=1)
    private Integer createUid;

    /** 删除标志 */
    @FormDesc(name="删除标志",maxLength=2,type=0)
    private String delFlag;

    private static final long serialVersionUID = 1L;

    public Integer getAid() {
        return aid;
    }

    public void setAid(Integer aid) {
        this.aid = aid;
    }

    public String getObjectName() {
        return objectName;
    }

    public void setObjectName(String objectName) {
        this.objectName = objectName;
    }

    public String getObjectKey() {
        return objectKey;
    }

    public void setObjectKey(String objectKey) {
        this.objectKey = objectKey;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMime() {
        return mime;
    }

    public void setMime(String mime) {
        this.mime = mime;
    }

    public String getFileDesc() {
        return fileDesc;
    }

    public void setFileDesc(String fileDesc) {
        this.fileDesc = fileDesc;
    }

    public String getUri() {
        return uri;
    }

    public void setUri(String uri) {
        this.uri = uri;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Date getCreateTs() {
        return createTs;
    }

    public void setCreateTs(Date createTs) {
        this.createTs = createTs;
    }

    public Integer getCreateUid() {
        return createUid;
    }

    public void setCreateUid(Integer createUid) {
        this.createUid = createUid;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", aid=").append(aid);
        sb.append(", objectName=").append(objectName);
        sb.append(", objectKey=").append(objectKey);
        sb.append(", name=").append(name);
        sb.append(", mime=").append(mime);
        sb.append(", fileDesc=").append(fileDesc);
        sb.append(", uri=").append(uri);
        sb.append(", code=").append(code);
        sb.append(", createTs=").append(createTs);
        sb.append(", createUid=").append(createUid);
        sb.append(", delFlag=").append(delFlag);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SecAttachment other = (SecAttachment) that;
        return (this.getAid() == null ? other.getAid() == null : this.getAid().equals(other.getAid()))
            && (this.getObjectName() == null ? other.getObjectName() == null : this.getObjectName().equals(other.getObjectName()))
            && (this.getObjectKey() == null ? other.getObjectKey() == null : this.getObjectKey().equals(other.getObjectKey()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getMime() == null ? other.getMime() == null : this.getMime().equals(other.getMime()))
            && (this.getFileDesc() == null ? other.getFileDesc() == null : this.getFileDesc().equals(other.getFileDesc()))
            && (this.getUri() == null ? other.getUri() == null : this.getUri().equals(other.getUri()))
            && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode()))
            && (this.getCreateTs() == null ? other.getCreateTs() == null : this.getCreateTs().equals(other.getCreateTs()))
            && (this.getCreateUid() == null ? other.getCreateUid() == null : this.getCreateUid().equals(other.getCreateUid()))
            && (this.getDelFlag() == null ? other.getDelFlag() == null : this.getDelFlag().equals(other.getDelFlag()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getAid() == null) ? 0 : getAid().hashCode());
        result = prime * result + ((getObjectName() == null) ? 0 : getObjectName().hashCode());
        result = prime * result + ((getObjectKey() == null) ? 0 : getObjectKey().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getMime() == null) ? 0 : getMime().hashCode());
        result = prime * result + ((getFileDesc() == null) ? 0 : getFileDesc().hashCode());
        result = prime * result + ((getUri() == null) ? 0 : getUri().hashCode());
        result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode());
        result = prime * result + ((getCreateTs() == null) ? 0 : getCreateTs().hashCode());
        result = prime * result + ((getCreateUid() == null) ? 0 : getCreateUid().hashCode());
        result = prime * result + ((getDelFlag() == null) ? 0 : getDelFlag().hashCode());
        return result;
    }
}